package com.yytek.nmp.init;

import com.yytek.nmp.service.impl.IotDeviceCacheServiceImpl;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * 初始化驱动所需缓存信息
 */
@Component
public class DriverInitRunner implements ApplicationRunner {

    @Resource
    private IotDeviceCacheServiceImpl deviceCacheService;

    @Override
    public void run(ApplicationArguments args) throws Exception {
        //初始化驱动缓存
        deviceCacheService.driverInitial();
    }
}
